<template>
  <div class="box">
    <h3>sonB</h3>
    <h4>{{ msg }}</h4>
  </div>
</template>
<script>
export default {
  name: 'SonB',
  data() {
    return {
      msg: ''
    }
  },
  mounted() {
    this.$bus.$on('atob', (message) => {
      this.msg = message
      console.log(message)
    })
  },
  beforeDestroy() {
    this.$bus.$off()
  },
  methods: {}
}
</script>
<style scoped lang="scss">
.box {
  width: 200px;
  height: 200px;
  background-color: pink;
}
</style>
